#!/usr/bin/perl

use 5.010;
use strict;
use warnings;

open IFILE, "list.txt" or die "no such file";
foreach my $line (<IFILE>) {
    
    chomp $line;    print "$line\n";}
close IFILE;

open IFILE, "list.txt" or die "no such file";
my @list = <IFILE>;
close IFILE;
chomp @list;print @list;

my $num = 1;foreach my $line (@list) {
    print "$num   $line\n";
    $num++;
}

say "Hello"